#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include<math.h>
int main()
{
    int age, age3, age4, b1, b2, b3, b4, a1, a2, a3, a4, a5, a6;
    for (age = 10; age < 22; age++)
    {
        age3 = age * age * age;
        if (age3 < 10000 && age3 >= 1000)
        {
            age4 = age3 * age;
            if (age4 < 1000000 && age4 >= 100000)
            {
                b4 = age3 / 1000;
                b3 = (age3 - (b4 * 1000)) / 100;
                b2 = (age3 - (b4 * 1000 - b3 * 100)) / 10;
                b1 = age3 % 10;
                a6 = age4 / 100000;
                a5 = (age4 / 10000) % 10;
                a4 = (age4 / 1000) % 10;
                a3 = (age4 / 100) % 10;
                a2 = (age4 / 10) % 10;
                a1 = age % 10;
                if ((a3 != a4) && (a2 != a6) && (b1 != b3) && (b1 != b4) && (b2 != b3) && (b3 != b4) && (a5 != a6) && (a2 != a3) && (a4 != a5) && (a5 != a6) && (b1 != b2) && (b3 != b4) && (a3 != a5))
                {
                    printf("age=%d", age);
                }
            }

        }
    }
    return 0;
}